package cn.com.self.apis.portal.entity;

import cn.com.selfsoft.smartcity.commons.entity.AbstractEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.sql.Timestamp;

/**用户实体
 * @Description
 */

@TableName("t_sys_user")
@Data
public class SysUserEntity extends AbstractEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 姓名
     */
    @ApiModelProperty(value = "姓名")
    private String name;

    // 用户名
    @ApiModelProperty(value = "用户名")
    private String username;
    @ApiModelProperty(value = "邮箱")
    private String email;
    @ApiModelProperty(value = "手机号码")
    private String phone;
    @ApiModelProperty(value = "身份证号码")
    private String idcard;
    @ApiModelProperty(value = "密码")
    private String password;

    //注册时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "注册时间")
    private Timestamp registerTime;

    //注册ip
    @ApiModelProperty(value = "注册ip")
    private String registerIp;

    //最后登录时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "最后登录时间")
    private Timestamp lastLoginTime;

    //最后登录ip
    @ApiModelProperty(value = "最后登录ip")
    private String lastLoginIp;

    //登录次数
    @ApiModelProperty(value = "登录次数")
    private Integer loginCount;

    //管理员级别
    @ApiModelProperty(value = "管理员级别")
    private Integer rank;

//    //是否管理员
//    @ApiModelProperty(value = "是否管理员")
//    private Integer isAdmin;

//    //是否只管理自己的数据
//    @ApiModelProperty(value = "是否只管理自己的数据")
//    private Integer isSelfAdmin;

    //是否禁用
    @ApiModelProperty(value = "是否禁用")
    private Integer isDisabled;






}
